using IQIGame.Onigao.Framework;

namespace IQIGame.Onigao.Logic
{
    public abstract class DynamicMultiParamObject : IReusableClass
    {
        public uint MaxStore => 50;
        public int type { get; protected set; }

        public virtual void OnReset()
        {
            type = 0;
        }
    }

    public class DynamicMultiParamObject<T1> : DynamicMultiParamObject
    {
        public T1 t1 { get; private set; }
        public void SetData(int type, T1 t1)
        {
            this.type = type;
            this.t1 = t1;
        }

        public override void OnReset()
        {
            t1 = default;
            base.OnReset();
        }
    }

    public class DynamicMultiParamObject<T1, T2> : DynamicMultiParamObject
    {
        public T1 t1 { get; private set; }
        public T2 t2 { get; private set; }

        public void SetData(int type, T1 t1, T2 t2)
        {
            this.type = type;
            this.t1 = t1;
            this.t2 = t2;
        }

        public override void OnReset()
        {
            t1 = default;
            t2 = default;
            base.OnReset();
        }
    }

    public class DynamicMultiParamObject<T1, T2, T3> : DynamicMultiParamObject
    {
        public T1 t1 { get; private set; }
        public T2 t2 { get; private set; }
        public T3 t3 { get; private set; }

        public void SetData(int type, T1 t1, T2 t2, T3 t3)
        {
            this.type = type;
            this.t1 = t1;
            this.t2 = t2;
            this.t3 = t3;
        }

        public override void OnReset()
        {
            t1 = default;
            t2 = default;
            t3 = default;
            base.OnReset();
        }
    }
}
